<template>
  <router-view v-if="$route.meta.m"></router-view>
  <el-container v-else id="app">
    <el-header class="header">
      <router-link class="span" to="/">My App</router-link>
    </el-header>
    <el-container class="container">
      <el-aside width="200px" class="aside">
        <hr>
        <router-link :to="{name: 'user', params: {username: 'zhangsan'}}">User / 张三</router-link>
        <router-link :to="{name: 'user', params: {username: 'lisi'}}">User / 李四</router-link>
        <router-link to="/foo">Go to Foo</router-link>
        <router-link to="/bar">Go to Bar</router-link>
        <router-link to="/todo">Todo</router-link>
        <router-link to="/m">M</router-link>
      </el-aside>
      <el-main>
<!--        <h1>{{$route.meta.m}}</h1>-->
        <router-view></router-view>
      </el-main>
    </el-container>
<!--    <div class="wrapper">
      <LeftBar/>
      <main>
        <router-view></router-view>
      </main>
    </div>-->
  </el-container>
</template>

<script>
// import Header from '@/components/Header'
// import LeftBar from '@/components/LeftBar'

export default {
  name: 'App',
  components: {
    // Header,
    // LeftBar
  }
}
</script>

<!--
sass-loader node-sass
webpack -> *-loader
ruby, -> nodejs
-->
<style lang="scss">
//@import "./assets/reset";

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

.header {
  background-color: #f0b1b1;
  height: 80px !important;
}

.container {
  height: calc(100vh - 80px);
  background-color: #b0b0b0;

  .el-aside {
    background-color: #f0b1b1;
  }

  .aside {
    a {
      display: block;
      height: 40px;
      line-height: 40px;
      padding: 0 20px;
      border-bottom: 1px solid #2c3e50;
      font-size: 20px;
      font-weight: bold;

      &.active1 {
        background-color: red;
      }
    }
  }
}
</style>